<?php
class Form_Category extends Zend_Form
{

/*	CREATE TABLE IF NOT EXISTS `pages_categories` (
  `id` int(11) NOT NULL auto_increment,
  `shorttitle` varchar(60) collate utf8_unicode_ci NOT NULL,
  `longtitle` varchar(255) collate utf8_unicode_ci NOT NULL,
  `shortdescription` text collate utf8_unicode_ci NOT NULL,
  `longdescription` text collate utf8_unicode_ci NOT NULL,
  `parentcategoryid` int(11) NOT NULL,
  `statut` varchar(60) collate utf8_unicode_ci NOT NULL,
  `lastmodified` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `datecreated` timestamp NOT NULL default '0000-00-00 00:00:00',
  `tags` text collate utf8_unicode_ci NOT NULL,
  `accesskey` varchar(50) collate utf8_unicode_ci NOT NULL,
  `author` varchar(50) collate utf8_unicode_ci NOT NULL,
  `pagetype` varchar(60) collate utf8_unicode_ci NOT NULL,
  `startdate` timestamp NOT NULL default '0000-00-00 00:00:00',
  `enddate` timestamp NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`)
)*/
	
	public function init()
    {
    	$shorttitle = $this->addElement('text', 'shorttitle', array(
            'filters'    => array('StringTrim', 'StringToLower'),
            'validators' => array(
                'Alnum',
                array('StringLength', false, array(1, 60)),             
            ),
            'required'   => true,
            'label'      => 'shorttitle',
        ));
        
        $longtitle = $this->addElement('text', 'longtitle', array(
            'validators' => array(
                'Alnum',
                array('StringLength', false, array(1, 255)),             
            ),
            'required'   => true,
            'label'      => 'longtitle',
        ));
        
        $shortdescription = $this->addElement('text', 'shortdescription', array(
            'validators' => array(
                'Alnum',
                array('StringLength', false, array(1, 1000)),             
            ),
            'required'   => true,
            'label'      => 'shortdescription',
        ));
        
        $longdescription = $this->addElement('text', 'longdescription', array(
            'validators' => array(
                'Alnum',           
            ),
            'required'   => true,
            'label'      => 'longdescription',
        ));
        
        $parentcategoryid = $this->addElement('text', 'parentcategoryid', array(
            'validators' => array(
                'Num',
                array('StringLength', false, array(1, 11)),             
            ),
            'required'   => true,
            'label'      => 'parentcategoryid',
        ));
        
        $statut = $this->addElement('text', 'statut', array(
            'filters'    => array('StringTrim', 'StringToLower'),
            'validators' => array(
                'Alnum',
        		array('StringLength', false, array(1, 50)),            
            ),
            'required'   => true,
            'label'      => 'statut',
        ));
        
        $datecreated = $this->addElement('text', 'datecreated', array(
            'filters'    => array('StringTrim', 'StringToLower'),
            'validators' => array(
                'Alnum',           
            ),
            'required'   => true,
            'label'      => 'statut',
        ));
        
        $statut = $this->addElement('text', 'statut', array(
            'filters'    => array('StringTrim', 'StringToLower'),
            'validators' => array(
                'Alnum',           
            ),
            'required'   => true,
            'label'      => 'statut',
        ));
        
        $statut = $this->addElement('text', 'statut', array(
            'filters'    => array('StringTrim', 'StringToLower'),
            'validators' => array(
                'Alnum',           
            ),
            'required'   => true,
            'label'      => 'statut',
        ));
        
        $statut = $this->addElement('text', 'statut', array(
            'filters'    => array('StringTrim', 'StringToLower'),
            'validators' => array(
                'Alnum',           
            ),
            'required'   => true,
            'label'      => 'statut',
        ));
        
        $statut = $this->addElement('text', 'statut', array(
            'filters'    => array('StringTrim', 'StringToLower'),
            'validators' => array(
                'Alnum',           
            ),
            'required'   => true,
            'label'      => 'statut',
        ));
        
        $statut = $this->addElement('text', 'statut', array(
            'filters'    => array('StringTrim', 'StringToLower'),
            'validators' => array(
                'Alnum',           
            ),
            'required'   => true,
            'label'      => 'statut',
        ));
    }
}
